window.addEventListener('load', function() {
    // 搜索模块移出移入效果
    //获取元素
    // let searchBtn = document.querySelector('#search-btn');
    let searchContent = document.querySelector('#search-content');
    let search = this.document.querySelector(".search");
    // 根据状态决定收不收回
    let searchState = true;
    search.addEventListener('mouseover', function() {
        if (searchState) {
            startMove(searchContent, {
                width: '195px',
                paddingLeft: '16px',
                paddingRight: '10px'
            }, 500, 'linear');
        }
    });
    search.addEventListener('mouseout', function() {
        if (searchState) {
            startMove(searchContent, {
                width: 0,
                padding: 0
            }, 500, 'linear');
        }
    });
    searchContent.addEventListener('focus', function() {
        searchState = false;
    });
})